package com.mymvc.controller.json;

import com.mymvc.controller.vo.Product;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * @author 王俊彪
 * @version 1.0
 */
@Controller("productController01")
@RequestMapping("/product")
public class ProductController {
    @GetMapping("/findById.do")
    public @ResponseBody Product findById(int id){
        int i = 1/0;
        return new Product(id,"TEL液晶电视",3999.00);

    }

    @PostMapping("/update.do")
    public void update(@RequestBody Product product){
        System.out.println(product);
        int i = 1/0;
    }
}
